<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
    <title>PPT辅助生成</title>
    <link rel="stylesheet" href="../../../css/mui.min.css" />
    <script src="../../../js/mui.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../../../css/app.css" />
    <link rel="stylesheet" href="../../../npl/css/vant.mini.css" />
    <link rel="stylesheet" href="../css/ppt.css" />
    <script src="../../../js/jquery-3.6.0.min.js"></script>
    <script src="../../../js/flexible.js"></script>
    <script src="../../../js/vue.js"></script>
    <script src="../../../js/sm2.js"></script>
    <script src="../../../js/sm3.js"></script>
    <script src="../../../js/clipboard.js"></script>
    <script src="../../../npl/js/vant.mini.js"></script>
    <script src="../../../js/vconsole.min.js"></script>
    <script src="../../text.js" type="text/javascript"></script>

    <script src="../js/util.js" type="text/javascript"></script>
    <script src="../js/multiBtn.js"></script>

    <style>

    </style>
</head>
<body>
<div id="app" v-cloak>
    <multi-btn></multi-btn>
    <div class="is-loading">
        <div class="curtain">
            <div class="loadingBgc">
                <div class="loader"></div>
            </div>
        </div>
    </div>
    <div class="trainTickets" style="height: calc(100% - 20px)">
        <div class="header_tit">
            <van-nav-bar title="PPT辅助生成" left-arrow>
                <template #left>
                    <div class="back_l" @click="home">
                        <img src="../../../image/left.png" alt="" />
                    </div>
                </template>
                <template #right>
                </template>
            </van-nav-bar>
        </div>
        <div style="padding: 0.2rem 0.4rem 0rem;">
            <van-row type="flex" justify="space-around">
                <van-col span="11" class="custom-col active-brightness" @click="topptView('filePPT')">
                </van-col>
                <van-col span="11" class="custom-col2 active-brightness" @click="topptView('outlinePPT')">
                </van-col>
                <van-col span="22" class="custom-col3 active-brightness" @click="topptView('directPPT')">
                </van-col>
            </van-row>
        </div>
        <div style="height: 100%;">
            <van-row :class="['search-row', isSearchFocused ? 'no-bottom' : '']">
                <div class="search-item-in active-brightness" v-if="!showSearch">
                    <a class="search-b">我的文档</a>
                    <!-- <input class="search-input" @keyup.enter="onSearch()" v-model="searchParams" placeholder="请输入搜索关键词"  v-if="showSearch" clearable @blur="showOrHide()"></input> -->
                    <!-- <img class="search-btn" src="../images/write/search-btn.png" /> -->
                    <div class="img-div active-brightness" @click="searchShow()">
                        <img class="search-btn-2"  src="../images/write/search-btn.png" alt="" />
                    </div>
                    <div class="img-div active-brightness" @click="deleteAllPptFiles()">
                        <img class="search-btn-3"  src="../images/qk.png" alt="" />
                    </div>
                </div>
                <div v-if="showSearch" style="line-height: 1rem;">
                    <van-icon name="search" class="search-btn-l"></van-icon>
                    <input v-if="showSearch" class="search-input" @keyup.enter="onSearch()" v-model="searchParams" placeholder="请输入..."></input>
                    <span @click="onCancel" class="search-cancle active-brightness">取消</span>
                </div>
            </van-row>
            <div class="cue-word">
                仅保留30天文件
            </div>
            <div v-if="isSearchFocused" style="display: flex;align-items: center;justify-content: center;width: 100%;margin-top: 50px;">
                <div class="searchBackGroud" >
                </div>
            </div>
            <div class="List" v-show="!isSearchFocused">
                <van-list
                        v-model="loading"
                        :finished="finished"
                        finished-text="没有更多了"
                        @load="onLoad">
                    <van-swipe-cell v-for="(item,index) in pptList" :key="index" 
                        @open="openSwipe(item)" @close="closeSwipe(item)">
                        <div class="list-item" @click="preview(item)">
                            <div class="list-item-l">
                                <!-- <img class="img" src="../images/ppt.png"/> -->
                                 <div class="list-item-l-back"></div>
                            </div>
                            <div class="list-item-r">
                                <div class="title">{{ item.name }}</div>
                                <div class="desc">{{ item.createTime }}</div>
                            </div>
                            <div class="list-item-r2" @click.stop="handleClickMore(item)">
                                <img class="swipe-left"  src="../../../image/more1.png" alt="" />
                            </div>
                        </div>
                        <!-- <template #right>
                            <van-button class="delete-button" @click="sendMail(item)" icon="../images/list-email.png" square text="发送" color="#4694fd">发送</van-button>
                            <van-button class="delete-button" @click="syncToInner(item)" icon="../images/list-sync.png" square text="同步" color="#f6ab00">同步</van-button>
                            <van-button class="delete-button" @click="share(item)" icon="../images/list-share.png" square text="分享" color="#00a096">分享</van-button>
                            <van-button class="delete-button" @click="delConfirm(item)" icon="../images/list-delete.png" square text="删除" color="#fc513f">删除</van-button>
                        </template> -->
                    </van-swipe-cell>
                </van-list>
                <van-share-sheet :options="options" v-model="showMore" 
                    class="sheet-pop"
                    cancel-text="" @select="onOptionSelect">
                    <template #title>
                        <div class="flex justify-between items-center w-full">
                            <span class="text-lg font-medium">更多操作</span>
                            <!-- 关闭按钮 -->
                            <van-icon style="position:absolute; top:15px;right:15px;" name="cross" size="18"
                                class="cursor-pointer" @click="showMore = false" />
                        </div>
                    </template>
                </van-share-sheet>
            </div>

            <!-- 显示重命名弹框 -->
            <div class="NamePop">
                <van-popup style="min-height: 4rem;" :close-on-click-overlay="false" v-model="showPopName">
                    <van-form>
                        <div style="text-align: center;font-size: 18px;font-weight:bold;margin-bottom: 10px;">重命名</div>
                        <van-field v-model="newTitleName" class="edit_title_input" placeholder="请输入标题" maxlength="100" />
                    </van-form>
                    <div class="form_btn">
                        <van-button type="default" size='10px' round @click="showPopName=false">取消</van-button>
                        <van-button type="primary" size='10px' color="#13C09B" round @click="reName">确定</van-button>
                    </div>
                </van-popup>
            </div>
        </div>
    </div>
</div>

<script src="../js/ppt.js"></script>
</body>
</html>
